package com.ruoyi.his.service.impl;

import com.ruoyi.his.domain.TMedicalDrugsStorage;
import com.ruoyi.his.domain.vo.TMedicalDrugsStorageVo;
import com.ruoyi.his.mapper.TMedicalDrugsStorageMapper;
import com.ruoyi.his.service.ITMedicalDrugsStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 药库Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-10
 */
@Service
public class TMedicalDrugsStorageServiceImpl implements ITMedicalDrugsStorageService
{
    @Autowired
    private TMedicalDrugsStorageMapper tMedicalDrugsStorageMapper;

    /**
     * 查询药库
     * 
     * @param storageid 药库主键
     * @return 药库
     */
    @Override
    public TMedicalDrugsStorage selectTMedicalDrugsStorageByStorageid(Long storageid)
    {
        return tMedicalDrugsStorageMapper.selectTMedicalDrugsStorageByStorageid(storageid);
    }

    /**
     * 查询药库列表
     * 
     * @param tMedicalDrugsStorage 药库
     * @return 药库
     */
    @Override
    public List<TMedicalDrugsStorageVo> selectTMedicalDrugsStorageList(TMedicalDrugsStorageVo tMedicalDrugsStorage)
    {
        return tMedicalDrugsStorageMapper.selectTMedicalDrugsStorageList(tMedicalDrugsStorage);
    }

    /**
     * 新增药库
     * 
     * @param tMedicalDrugsStorage 药库
     * @return 结果
     */
    @Override
    public int insertTMedicalDrugsStorage(TMedicalDrugsStorage tMedicalDrugsStorage)
    {
        return tMedicalDrugsStorageMapper.insertTMedicalDrugsStorage(tMedicalDrugsStorage);
    }

    /**
     * 修改药库
     * 
     * @param tMedicalDrugsStorage 药库
     * @return 结果
     */
    @Override
    public int updateTMedicalDrugsStorage(TMedicalDrugsStorage tMedicalDrugsStorage)
    {
        return tMedicalDrugsStorageMapper.updateTMedicalDrugsStorage(tMedicalDrugsStorage);
    }

    /**
     * 批量删除药库
     * 
     * @param storageids 需要删除的药库主键
     * @return 结果
     */
    @Override
    public int deleteTMedicalDrugsStorageByStorageids(Long[] storageids)
    {
        return tMedicalDrugsStorageMapper.deleteTMedicalDrugsStorageByStorageids(storageids);
    }

    /**
     * 删除药库信息
     * 
     * @param storageid 药库主键
     * @return 结果
     */
    @Override
    public int deleteTMedicalDrugsStorageByStorageid(Long storageid)
    {
        return tMedicalDrugsStorageMapper.deleteTMedicalDrugsStorageByStorageid(storageid);
    }

    @Override
    public TMedicalDrugsStorage getDrugsId(Long drugsid) {
        return tMedicalDrugsStorageMapper.getDrugsId(drugsid);
    }
}
